package com.heaven.controller;

import com.heaven.service.MapService;
import com.heaven.vo.PageResult;
import com.heaven.vo.SysResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@CrossOrigin
public class MapController {
    @Autowired
    private MapService mapService;
    @GetMapping("/map/addressList")
    public SysResult addressList(PageResult pageResult){
        pageResult=mapService.addressList(pageResult);
        return SysResult.success(pageResult);
    }
    @DeleteMapping("/delete/{id}")
    public SysResult deleteAddre(@PathVariable Integer id){
        mapService.deleteAddre(id);
        return SysResult.success();
    }
}
